<form name="form_admin" method="POST" action="<?php echo formEditAction()?>" >
<table border="0" width="100%" cellpadding="0" cellspacing="0">
   <tr>
		<td height="20"></td>
	</tr>
    <tr>
        <td width="100"><b>Category</b></td>
        <td>
        <select name="Category" id="Category">
          	<?php echo ListOptionCategory($module,$id,-1)?>
        </select>
        <textarea style="display:none"></textarea>
        </td>
    </tr>
    <tr>
    <td colspan="2">
		<table width="100%" cellpadding="4" cellspacing="1"id="tblsort">
			<tr class="headtb" nodrop="true" nodrag="true">
				<td width="5" ><?php echo _IMAGE?></td>
				<td width="300" ><?php echo _NAME?></td>
				<td width="20" ><?php echo _ACTIONS?></td>
				<td></td>
			</tr>
		</table>
		<input type="button" class="b1" onclick="tinyMCE.execCommand('mceTrImgC',{func:addrow,fdf:'gallery'})" value="Select Images">
		<input type="button" onclick="location.reload(true)" class="b1" id="breset"  value="<?php echo _RESET?>">
    </td>
    </tr>
</table>
</form>
<script>
var orderrow=0;
var addrow=function (obj)
{
	tblroot=getId("tblsort").tBodies[0];
	var newtr=document.createElement("tr");
	newtr.className='row_'+(orderrow%2);
	var newtd=document.createElement("td");
	newtd.innerHTML="<img src='"+obj.r+obj.p+obj.f+"' width=30 height=30>";
	newtr.appendChild(newtd);

	var newtd=document.createElement("td");
	var input1=document.createElement("input");
	input1.className="edit";
	input1.name="ListName[]";
	input1.value=obj.f;
	input1.onclick=function(){this.select()};
	newtd.appendChild(input1);
	input1=document.createElement("input");
	input1.type="hidden";
	input1.name="ListUrl[]";
	input1.value=obj.p+obj.f;
	newtd.appendChild(input1);
	newtr.appendChild(newtd);
	var newtd=document.createElement("td");
	var newa=document.createElement("a");
	newa.innerHTML="delete";
	newa.style.cursor="pointer";
	newa.onclick=function()
	{
		tblroot.removeChild(newtr);
		orderrow--;
	};
	newtd.appendChild(newa);
	newtr.appendChild(newtd);

	tblroot.appendChild(newtr);
	orderrow++;
};
</script>